Adaptive evaluation of non-strict programs

نویسندگان

  • Robert J. Ennals
  • Fergus Henderson
  • Neil Johnson
  • Alan Lawrence
چکیده

Most popular programming languages are strict. In a strict language, the binding of a variable to an expression coincides with the evaluation of the expression. Non-strict languages attempt to make life easier for programmers by decoupling expression binding and expression evaluation. In a non-strict language, a variable can be bound to an unevaluated expression, and such expressions can be passed around just like values in a strict language. This separation allows the programmer to declare a variable at the point that makes most logical sense, rather than at the point at which its value is known to be needed. Non-strict languages are usually evaluated using a technique called Lazy Evaluation. Lazy Evaluation will only evaluate an expression when its value is known to be needed. While Lazy Evaluation minimises the total number of expressions evaluated, it imposes a considerable bookkeeping overhead, and has unpredictable space behaviour. In this thesis, we present a new evaluation strategy which we call Optimistic Evaluation. Optimistic Evaluation blends lazy and eager evaluation under the guidance of an online profiler. The online profiler observes the running program and decides which expressions should be evaluated lazily, and which should be evaluated eagerly. We show that the worst case performance of Optimistic Evaluation relative to Lazy Evaluation can be bounded with an upper bound chosen by the user. Increasing this upper bound allows the profiler to take greater risks and potentially achieve better average performance. This thesis describes both the theory and practice of Optimistic Evaluation. We start by giving an overview of Optimistic Evaluation. We go on to present formal model, which we use to justify our design. We then detail how we have implemented Optimistic Evaluation as part of an industrial-strength compiler. Finally, we provide experimental results to back up our claims.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Adaptive Consensus Control for a Class of Non-affine MIMO Strict-Feedback Multi-Agent Systems with Time Delay

In this paper, the design of a distributed adaptive controller for a class of unknown non-affine MIMO strict-feedback multi agent systems with time delay has been performed under a directed graph. The controller design is based on dynamic surface control  method. In the design process, radial basis function neural networks (RBFNNs) were employed to approximate the unknown nonlinear functions. S...

متن کامل

Lenient evaluation is neither strict nor lazy

What is a non-strict functional language? Is a non-strict language necessarily lazy? What additional expressiveness brings non-strictness, with or without laziness? This paper tries to shed some light on these questions. First, in order to characterize non-strictness, di1erent evaluation strategies are introduced: strict, lazy, and lenient. Then, using program examples, how these evaluation str...

متن کامل

Why the Constant 'Undefined'? Logics of Partial Terms for Strict and Non-Strict Functional Programming Languages

In this article we explain two different operational interpretations of functional programs by two different logics. The programs are simply typed λ-terms with pairs, projections, if-then-else, and least fixed point recursion. A logic for call-by-value evaluation and a logic for call-byname evaluation are obtained as as extensions of a system which we call the basic logic of partial terms (BPT)...

متن کامل

ADAPTIVE FUZZY TRACKING CONTROL FOR A CLASS OF NONLINEAR SYSTEMS WITH UNKNOWN DISTRIBUTED TIME-VARYING DELAYS AND UNKNOWN CONTROL DIRECTIONS

In this paper, an adaptive fuzzy control scheme is proposed for a class of perturbed strict-feedback nonlinear systems with unknown discrete and distributed time-varying delays, and the proposed design method does not require a priori knowledge of the signs of the control gains.Based on the backstepping technique, the adaptive fuzzy controller is constructed. The main contributions of the paper...

متن کامل

Vineland Adaptive Behavior Scale for People with Mental Retardation, Emotional Disorders, and Behavioral Problems

Objectives: The Vineland Adaptive Behavior Scale-II is useful in assessing an individual’s daily functioning. They can be used as an evaluation and diagnostic tool for individuals who are mentally retarded or individuals with other handicaps. Methods: To determine the efficacy of VABS in clinical settings, 3 cases with mental retardation and behavioral or emotional problems were evaluated ac...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2004